﻿using System;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

#pragma warning disable CA1814 // Prefer jagged arrays over multidimensional

namespace TrackSystem.EntityFramework.Migrations
{
    /// <inheritdoc />
    public partial class cm8 : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DeleteData(
                table: "AspNetRoles",
                keyColumn: "Id",
                keyValue: "7986346b-3136-4f89-bac7-2cb56ad8a6b4");

            migrationBuilder.DeleteData(
                table: "AspNetRoles",
                keyColumn: "Id",
                keyValue: "9517e0d3-ffdb-44c0-bb71-71456af007ae");

            migrationBuilder.DeleteData(
                table: "AspNetRoles",
                keyColumn: "Id",
                keyValue: "a9b42537-2536-4c7b-b537-4a839c196620");

            migrationBuilder.DeleteData(
                table: "AspNetRoles",
                keyColumn: "Id",
                keyValue: "c6d874ed-7b80-4068-b2fc-776cd9e9533b");

            migrationBuilder.DeleteData(
                table: "AspNetRoles",
                keyColumn: "Id",
                keyValue: "d4f71599-da8b-4c65-bbe3-c1a5e9b6e25b");

            migrationBuilder.CreateTable(
                name: "alarm",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
                    happenDt = table.Column<DateTime>(type: "datetime(6)", nullable: false),
                    Description = table.Column<string>(type: "longtext", nullable: true)
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    SourceType = table.Column<int>(type: "int", nullable: false),
                    SourceName = table.Column<string>(type: "longtext", nullable: true)
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Value = table.Column<double>(type: "double", nullable: false),
                    Counter = table.Column<int>(type: "int", nullable: false),
                    Confirm = table.Column<bool>(type: "tinyint(1)", nullable: false),
                    confirmDt = table.Column<DateTime>(type: "datetime(6)", nullable: false),
                    Hidden = table.Column<bool>(type: "tinyint(1)", nullable: false),
                    Range = table.Column<double>(type: "double", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_alarm", x => x.Id);
                })
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.InsertData(
                table: "AspNetRoles",
                columns: new[] { "Id", "ConcurrencyStamp", "Name", "NormalizedName" },
                values: new object[,]
                {
                    { "3604f82d-7fc0-411f-8d9b-e8f152757443", null, "Admin", "ADMIN" },
                    { "42cecf2d-a96a-44b8-9d29-02b480bc0515", null, "User", "User" },
                    { "ce829965-368c-4860-8cc9-52d5d451e84a", null, "Eng", "Engineer" },
                    { "eed9ea9b-743d-4281-86a7-28ee1a38c74d", null, "Guest", "Guest" },
                    { "ef49eccb-4a23-465f-9474-ca2836481787", null, "Op", "Operator" }
                });
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "alarm");

            migrationBuilder.DeleteData(
                table: "AspNetRoles",
                keyColumn: "Id",
                keyValue: "3604f82d-7fc0-411f-8d9b-e8f152757443");

            migrationBuilder.DeleteData(
                table: "AspNetRoles",
                keyColumn: "Id",
                keyValue: "42cecf2d-a96a-44b8-9d29-02b480bc0515");

            migrationBuilder.DeleteData(
                table: "AspNetRoles",
                keyColumn: "Id",
                keyValue: "ce829965-368c-4860-8cc9-52d5d451e84a");

            migrationBuilder.DeleteData(
                table: "AspNetRoles",
                keyColumn: "Id",
                keyValue: "eed9ea9b-743d-4281-86a7-28ee1a38c74d");

            migrationBuilder.DeleteData(
                table: "AspNetRoles",
                keyColumn: "Id",
                keyValue: "ef49eccb-4a23-465f-9474-ca2836481787");

            migrationBuilder.InsertData(
                table: "AspNetRoles",
                columns: new[] { "Id", "ConcurrencyStamp", "Name", "NormalizedName" },
                values: new object[,]
                {
                    { "7986346b-3136-4f89-bac7-2cb56ad8a6b4", null, "Admin", "ADMIN" },
                    { "9517e0d3-ffdb-44c0-bb71-71456af007ae", null, "Guest", "Guest" },
                    { "a9b42537-2536-4c7b-b537-4a839c196620", null, "Op", "Operator" },
                    { "c6d874ed-7b80-4068-b2fc-776cd9e9533b", null, "User", "User" },
                    { "d4f71599-da8b-4c65-bbe3-c1a5e9b6e25b", null, "Eng", "Engineer" }
                });
        }
    }
}
